package com.zzyl.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.AbstractCredentials;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.core.region.Region;
import com.huaweicloud.sdk.iotda.v5.*;
import com.huaweicloud.sdk.iotda.v5.model.*;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ListProductsSolution {

    @Autowired
    private IoTDAClient client;

    @Test
    public  void testProducts() {

       ListProductsRequest request = new ListProductsRequest();
        request.setLimit(50);
        ListProductsResponse listProductsResponse = client.listProducts(request);
        // client.addDevice()
        // client.showDevice()
        // client.showDeviceShadow()

        System.out.println(listProductsResponse);
    }
}
